package cn.parllay.dingdangproject.global;

/**
 * Created by sunny on 2017/8/18.
 * 接口类
 */

public class API {

    public static final String HOST_NAME = "http://vipai.dingdian.xin";
    public static final String HOST_NAME_TEST = "http://ppe.dingdian.xin:8087";
    private static String hostName = HOST_NAME;
    private  static String serverHost;


    public static void setProEnvironment(boolean isPro) {
        serverHost = isPro ? "39.106.192.164" : "47.104.82.9";
        hostName = isPro ? HOST_NAME : HOST_NAME_TEST;
    }

    //获取域名
    public static String getServiceHost() {

        return serverHost;
    }

    //获取token接口
    public static String getToken() {
        return hostName + "/dingdang/image/getToken";
    }



    //APP版本升级接口
    public static final String APP_UPGRADE = HOST_NAME + "/dingdang/upgrade/android";

    //获取VIP客户列表接口
    public static String listVip() {
        return hostName + "/dingdang/customer/findVipCustByTime";
    }

    //根据姓名查询VIP
    public static String findVipByName() {
        return hostName + "/dingdang/customer/findByCustName";
    }


    //根据时间获取到店顾客
    public static String findArrivalCustomerByTime() {
        return hostName + "/dingdang/capture/list";
    }

    //根据时间获取收银台顾客
    public static String findCounterCustomerByTime() {
        return hostName + "/dingdang/capture/listCounter";
    }

    //获取VIP顾客列表
    public static String findVipCustomerByTime() {
        return hostName + "/dingdang/customer/findVipCustByTime";
    }

    //新增客户接口
    public static String addCustomer() {
        return hostName + "/dingdang/customer?cmd=addCustomer";
    }

    //编辑客户信息接口
    public static String editCustomer() {
        return hostName + "/dingdang/customer/edit";
    }

    //获取客户基本信息接口
    public static String getCustomer() {
        return hostName + "/dingdang/customer?cmd=getCustomer";
    }

    //获取客户交易记录
    public static String listDeal() {
        return hostName + "/dingdang/customer?cmd=listDeal";
    }

    //获取客户进店事件
    public static String timeLine() {
        return hostName + "/dingdang/timeLine/selectTimeLine";
    }

    //获取VIP客户进店通知
    public static String notice() {
        return hostName + "/dingdang/notice?cmd=getLatest";
    }

    //查询订单接口
    public static String findDeal() {
        return hostName + "/dingdang/dealshow/find";
    }

    //关联订单接口
    public static String setDeal() {
        return hostName + "/dingdang/customer?cmd=setDeal";
    }

    //获取任务列表接口
    public static String getTaskInfo() {
        return hostName + "/dingdang/task/getTaskInfo";
    }

    //删除任务接口
    public static String deleteTask() {
        return hostName + "/dingdang/task/deleteTask";
    }

    //修改任务接口
    public static String modifyTask() {
        return hostName + "/dingdang/task/modifyTask";
    }

    //添加任务接口
    public static String addTask() {
        return hostName + "/dingdang/task/addTask";
    }

    //获取任务组接口
    public static String getTaskGroup() {
        return hostName + "/dingdang/taskGroup/getTaskGroupInfo";
    }

    //获取店员任务完成率
    public static String getEmployeeTaskRate() {
        return hostName + "/dingdang/task/getTaskStatisticsByEmploye";
    }

    //获取当前门店任务完成率
    public static String getStoreTaskRate() {
        return hostName + "/dingdang/task/getTaskStatisticsByStore";
    }

    //获取总的任务完成率
    public static String getAllTaskRate() {
        return hostName + "/dingdang/task/getTaskStatisticsByCompany";
    }

    //获取店员接口
    public static String listEmploye() {
        return hostName + "/dingdang/employe?cmd=listEmploye";
    }

    //获取颜色
    public static String listColorName() {
        return hostName + "/dingdang/code?cmd=listColorName";
    }

    //获取尺码
    public static String listSizeName() {
        return hostName + "/dingdang/code?cmd=listSizeName";
    }


    /****************************************************
     * 统计报表接口
     ****************************************************
     */

    //获取客流量
    public static String getCustomersByWeek() {
        return hostName + "/dingdang/report/getArrivalCountByWeekLink";
    }

    //获取VIP和普通客户总数
    public static String getAllCustomer() {
        return hostName + "/dingdang/report/isvipCompare ";
    }

    //获取客户性别比例
    public static String genderCompare() {
        return hostName + "/dingdang/report/genderCompare";
    }

    //获取客户年龄分布
    public static String ageGroupCompare() {
        return hostName + "/dingdang/report/ageGroupCompare";
    }

    //获取客户年龄分布
    public static String uploadHeadImage() {
        return hostName + "/dingdang/headImage/saveHeadImage";
    }

    //获取一个时间段的销售额
    public static String getAmount() {
        return hostName + "/dingdang/report/getAmount";
    }

    //获取一个时间段的连带率
    public static String getJoinTrate() {
        return hostName + "/dingdang/report/getJointRate";
    }

    //获取一个时间段的客单价
    public static String getGuestPrice() {
        return hostName + "/dingdang/report/getGuestPrice";
    }

    //获取一个时间段的成交单数
    public static String getDealCount() {
        return hostName + "/dingdang/report/getDealCount";
    }

    //获取一个时间段的成交率
    public static String getRatio() {
        return hostName + "/dingdang/report/getRatio";
    }

    //获取一个时间段的每日VIP客流量对比数
    public static String getVipDailyChangeByDay() {
        return hostName + "/dingdang/report/getVipDailyChangeByDay";
    }

    //快速录入订单接口
    public static String fastEditDeal() {
        return hostName + "/dingdang/orderEntry/insertOrder";
    }

    //快速录入订单接口(Vip详情页快速录单接口新)
    public static String addOrder() {
        return hostName + "/dingdang/orderEntry/addOrder";
    }

    //获取VIP增长和销售额接口
    public static String getVipWithAmount() {
        return hostName + "/dingdang/report/getVipCountAndAmount";
    }

    //获取客流量和销售额
    public static String getCustomerWithAmount() {
        return hostName + "/dingdang/report/getArrivalCountAndAmount";
    }

    //快速录入VIP接口(点击主页加号)
    public static String fastAddVip() {
        return hostName + "/dingdang/customer/editAndAddVip";
    }

    //获取门店
    public static String listStore() {
        return hostName + "/dingdang/store?cmd=listStore";
    }

    //修改登录密码
    public static String modifyUser() {
        return hostName + "/dingdang/user/modifyUser";
    }

    //合并头像
    public static String mergeHeadImage() {
        return hostName + "/dingdang/customer/updateHeadImage";
    }

    //根据VIP助手门店编号查询对应的叮店编号
    public static String getDingStoreNo() {
        return hostName + "/dingdang/store/switchStoreNo";
    }

    //查询相似VIP接口
    public static String searchFace() {
        return hostName + "/dingdang/vip/searchFace";
    }

    //合并VIP接口(点击VIP设置按钮)
    public static String createVip() {
        return hostName + "/dingdang/vip/createVip";
    }
    //快速设为VIP接口(点击VIP设置按钮)
    public static String setVip() {
        return hostName + "/dingdang/vip/createVipNew";
    }

    //获取到店顾客客流量
    public static String getCustomerTraffic() {
        return hostName + "/dingdang/capture/getCustomerTraffic";
    }




    //获取任务完成率
    public static String getTaskProgress() {
        return hostName + "/dingdang/task/getTaskStatisticsByTaskGroup";
    }

    //总览页获取实时客流数据(折线图今日)
    public static String getTodayTraffic() {
        return hostName + "/dingdang/capture/getRealTimeCustomerTrafficReportToday";
    }

    //总览页获取实时客流数据(折线图昨日)
    public static String getYesterdayTraffic() {
        return hostName + "/dingdang/capture/getRealTimeCustomerTrafficReportYesterday";
    }

    //总览页获取实时客流数据(折线图日均)
    public static String getAvgTraffic() {
        return hostName + "/dingdang/capture/getRealTimeCustomerTrafficReportAvg";
    }

    //获取今日和昨日客流量(总览页实时客流里面)
    public static String getTodayAndYesterdayCustomerTraffic() {
        return hostName + "/dingdang/capture/getRealTimeCustomerTraffic";
    }
    //百度OCR识别小票接口
    public static String baiduDetect() {
        return hostName + "/dingdang/orderEntry/analysisImage";
    }

    //添加VIP接口
    public static String addVip() {
        return hostName + "/dingdang/vip/addVip";
    }

}
